package com.example.mobileeducationstudentv;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;

public class StudyDisplay extends Activity {
	
	private Spinner studySpinner;
	private Button btnSubmit;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.studydisplay);
		
		addListenerOnButton();
		//addListenerOnSpinnerItemSelection();
	}
	
	public void addListenerOnButton(){
		studySpinner = (Spinner) findViewById(R.id.studySpinner);
		btnSubmit = (Button) findViewById(R.id.btnSubmit);
		
		btnSubmit.setOnClickListener(new OnClickListener() {
			 
			  @Override
			  public void onClick(View v) {
				  //if (String.valueOf(studySpinner.getSelectedItem()) == "Data Mining Lecture 1" ){
					  Intent assIntent = new Intent(StudyDisplay.this, Study.class);
					  startActivity(assIntent);
				  //}
				  //else {
					  //Toast.makeText(getApplicationContext(), "Please select a valid lecture", Toast.LENGTH_LONG).show();
				  //}
			  }
		 
			});
	}
}
